/* 去除.room下对话框的遮罩背景色 */
.room {
    .van-overlay {
        background-color: rgba(0, 0, 0, 0) !important;
    }
}

/*  ———————————————————————————————————————————————————— */


/* 单行省略 */
@mixin line-ellipsis-one {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 多行省略 */
@mixin line-ellipsis-more {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    /* -webkit-line-clamp: 3; 显示几行 */
    overflow: hidden;
}


/* 清除浮动 */
@mixin clear-after {
    zoom: 1;
    &:after {
        content: '';
        display: block;
        clear: both;
    }
}

/* 弹性盒子 */
$type: 1 !default;
@mixin flex-box {
    display: flex;
    @if $type==1 {
        justify-content: space-between;
    }

    @else if $type==2 {
        justify-content: center;
    }

    @else {
        justify-content: space-around;
    }
}


@mixin static {
    @if $type==1 {
       position: absolute;
    }

    @else if $type==2 {
        position: relative;
    }

    @else {
        position: fixed;
    }
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
}

/* 默认边距 */
$side: 1;
@mixin margin-side {
    @if $side==1 {
        margin: 17px 16px;
    }

    @else if $side==2 {
        margin: 0.4266rem; //16px的rem单位
    }

    @else {
        padding: 17px 16px;
    }
}


/* 垂直水平居中 */
@mixin vertical-center {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    display: flex;
    &:after {
        margin: auto;
    }
}

/* —————————————————————————————————— */
/* 文字居中 */
.text-align-ct {
    text-align: center;
}

/* 文字右对齐 */
.text-align-rg {
    text-align: right;
}

/* 常用颜色（color: nth($color, 1) */
$color:#333333 #666666 #999999 #fff #327bfa;

/* 常用圆角 */
$radius:5px 10px 15px 25px 50px 100%;

/* 公共按钮样式 */
.foot_btn{
    margin: 24px 16px;
    .van-button--normal{
        width: 100%;
        border-radius:10px;
    }
}

.page{
    .weui-cell__ft{
        font-size: 14px!important;
    }
}

$background: #F5F6FA !default;
$header-height: 45px !default;
$nav-height: 50px !default;

/* 常规px大小 */
$px1: 1px !default;
$px2: 2px !default;
$px3: 3px !default;
$px4: 4px !default;
$px5: 5px !default;
$px10: 10px !default;
$px15: 15px !default;
$px18: 18px !default;
$px20: 20px !default;
$px22: 22px !default;
$px28: 28px !default;

/* 白色背景 */
.bg-white{background: nth($color, 4)}

.m-a{margin:0 auto}
.display-ib{display: inline-block;}
.display-b{display: block;}

@for $i from 1 through 40 {
    .m-t#{$i} {
        margin-top: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .m-r#{$i} {
        margin-right: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .m-b#{$i} {
        margin-bottom: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .m-l#{$i} {
        margin-left: 1px * $i;
    }
}


@for $i from 1 through 40 {
    .p-t#{$i} {
        padding-top: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .p-r#{$i} {
        padding-right: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .p-b#{$i} {
        padding-bottom: 1px * $i;
    }
}
@for $i from 1 through 40 {
    .p-l#{$i} {
        padding-left: 1px * $i;
    }
}

// font-size
@for $i from 12 through 30 {
    .fs-#{$i} {
        font-size: 1px * $i;
    }
}
 

/* px转换rem */
$browser-default-font-size: 37.5px !default;
@function pxTorem($px) {
  @if (unitless($px)) {
    @return pxTorem($px + 0px);
  } @else if (unit($px) == em) {
    @return $px;
  }
  @return ($px / $browser-default-font-size) * 1rem;
}



@for $i from 1 through 40 {
    .rem-m-t#{$i} {
        margin-top: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-m-r#{$i} {
        margin-right: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-m-b#{$i} {
        margin-bottom: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-m-l#{$i} {
        margin-left: pxTorem($i);
    }
}


@for $i from 1 through 40 {
    .rem-p-t#{$i} {
        padding-top: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-p-r#{$i} {
        padding-right: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-p-b#{$i} {
        padding-bottom: pxTorem($i);
    }
}
@for $i from 1 through 40 {
    .rem-p-l#{$i} {
        padding-left: pxTorem($i);
    }
}


@for $i from 1 through 40 {
    .rem-f-z#{$i} {
        font-size: pxTorem(1 * $i);
    }
}
